package com.dfrz.factory;

import com.dfrz.entity.User;

/**
 * 实例工厂-方法是成员方法
 * 用来创建对象
 */
public class InstanceFactory {

    public User createUser(){
        User user = new User();
        user.setId(2L);
        user.setUserName("王二麻子");
        user.setPassword("000000");
        return user;
    }

}
